package com.shycloud.mido.member.api.vo;

import com.shycloud.mido.member.api.entity.MultiAssist;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import lombok.Data;

@Data
@ApiModel
public class MultiAssistVO extends MultiAssist {

	/** 教师是否有辅导权限 0-无 1-有 2-已过期 */
	@ApiModelProperty("教师是否有辅导权限 0-无 1-有 2-已过期")
	private String isAssistPermission;

	public String getIsAssistPermission() {

		if (this.getEndTime() == null) {
			return "0";
		}

		if (this.getEndTime().isAfter(LocalDateTime.now())) {
			return "1";
		} else {
			return "2";
		}

	}

}
